package client // Package client import "xemo.top/docker/docker/client"
import "context"

// ContainerPause 暂停给定容器的主进程而不终止它。
// ContainerPause pauses the main process of a given container without terminating it.
func (cli *Client) ContainerPause(ctx context.Context, containerID string) error {
	resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil)
	defer ensureReaderClosed(resp)
	return err
}
